package com.example.ffepeg.ffe;

import java.util.ArrayList;
import java.util.List;
import java.util.Locale;

public class Sfsdfas {
/*    public static void main(String[] args) {
        String text = "AI水电费12哈收到了asdf多少发96斯蒂芬";
        String s = text.replaceAll("[^a-zA-Z0-9\\u4e00-\\u9fa5]", "");
        System.out.println(s);
    }*/

/*    public static void main(String[] args) {
        String sdf = "北国风光千万里冰封万里雪飘远望长城内外江山如此多娇引得无易AI数英雄竞折腰这词是众人的最爱仿佛又回433123到了战火纷飞的年代又看到指点江山的伟人称雄一世的人物成吉思汗只知道拉弓射大雕这些人物全都过去了";
        int chunkSize = 20;
        StringBuilder result = new StringBuilder();
        for (int i = 0; i < sdf.length(); i += chunkSize) {
            String line = sdf.substring(i, Math.min(sdf.length(), i + chunkSize));
            result.append(line).append("\n"); // 添加换行符
        }

        System.out.println(result.toString());
    }*/

/*    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        list.add("A");
        list.add("B");
        list.add("C");
        list.add("D");
        list.add("E");
        list.add("F");
        list.add("G");
        list.add("H");
        list.add("I");
        list.add("J");
        list.add("K");
        list.add("L");
        list.add("M");
        list.add("N");
        list.add("O");
        list.add("P");

        int order = 0;
        int groupSize = 10;
        List<List<String>> groupedLists = new ArrayList<>();
        for (int i = 0; i < list.size(); i += groupSize) {
            int end = Math.min(i + groupSize, list.size());
            groupedLists.add(new ArrayList<>(list.subList(i, end)));
        }
        // 打印结果
        for (List<String> group : groupedLists) {
            ++order;
            StringBuilder builder = new StringBuilder();
            for (int i = 0; i < group.size(); i++) {
                builder.append(group.get(i));
            }
            System.err.println(order);
            System.out.println(builder.toString());
        }
    }*/

    public static void main(String[] args) {
        String result = "";
        String formatted = String.format(Locale.US, "%,d", 9);
        int format = formatted.length();
        if (format == 1) {
            result = "0,00" + formatted;
        } else if (format == 2) {
            result = "0,0" + formatted;
        } else if (format == 3) {
            result = "0," + formatted;
        } else {
            result = formatted;
        }
        System.out.println(result);
    }

}
